package jass.iss.edu.Screen;


import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTable;
import javax.swing.JScrollPane;


public class JobAdvertisementListScreen_Old extends JFrame {
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	//Frame properties
	public JFrame app_Frame;
	public String app_FrameTitle;
	
	//Layout
	private BorderLayout app_Layout;
	
	//Panel 
	private JPanel app_Panel;
	
	//Table for lists
	private JTable app_Table;
	private JScrollPane app_ScrollPane;

	public JobAdvertisementListScreen_Old(){
		
		//Job Advertisement List Screen Frame properties 
		app_FrameTitle = "Job Advetisement List Screen";
		app_Frame = new JFrame(app_FrameTitle);
		
		//TO be removed for testing only
		app_Frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

		
		this.app_Layout = new BorderLayout();
		this.app_Panel = new JPanel(app_Layout);
		app_Frame.getContentPane().add(app_Panel,BorderLayout.CENTER);
				
	}
	
	public void addTableData(String[][] tableRows, String[] tableColumns){
		
		this.app_Table = new UIComponment_JTable(tableRows, tableColumns);
		
		//table.setRowHeight(table.getRowHeight() * lines);
		//table.setDefaultRenderer(String.class, new MultiLineCellRenderer());
		
		//this.app_Table.setRowHeight(this.app_Table.getRowHeight() * 2);
		//this.app_Table.setDefaultRenderer(String.class, new MultiLineCellRenderer())
		
		this.app_ScrollPane = new JScrollPane(app_Table);
		
	}
	
	public void showAdvertisementListScreen(){
		
		app_Frame.getContentPane().add(this.app_ScrollPane,BorderLayout.NORTH);
		app_Frame.pack();
		
		app_Frame.setVisible(true);
	}
	
}
